import axios from '@/utils/request'

// 获取企业列表
const getEnterpriseList = (data: object) => {
  return axios({
    url: '/enterprise/list',
    params: data
  })
}

// 更改状态
const changeEnterPriseStatus = (data: object) => {
  return axios({
    url: '/enterprise/status',
    method: 'POST',
    data
  })
}

// 删除企业
const deleteEnterprise = (data: object) => {
  return axios({
    url: '/user/remove',
    method: 'POST',
    data
  })
}

// 增加企业
const addEnterprise = (data: object) => {
  return axios({
    url: '/enterprise/add',
    method: 'POST',
    data
  })
}

// 编辑企业
const updateEnterprise = (data: object) => {
  return axios({
    url: '/enterprise/edit',
    method: 'POST',
    data
  })
}

export {
  getEnterpriseList,
  changeEnterPriseStatus,
  deleteEnterprise,
  addEnterprise,
  updateEnterprise
}
